package com.lil.shiro.exception;


import com.lil.shiro.result.ResultCode;

public class BusinessException extends Exception {

    private ResultCode code;


    //直接接受EmBusinessExceptionError的传参用户构造业务异常
    public BusinessException(ResultCode code) {
        super();
        this.code = code;
    }

    public ResultCode getResultCode() {
        return this.code;
    }

    public int getErrCode() {
        return this.code.getCode();
    }


    public String getErrMsg() {
        return this.code.getMsg();
    }

}
